#ifndef GUDAYWELLWINDOW_H
#define GUDAYWELLWINDOW_H

#include <QMainWindow>

#include "ui_gudaywellwindow.h"
#include "insertdatadialog.h"
#include "daysform.h"
#include "dbadmin.h"

class QTemporaryFile;
class QString;
class GudaywellWindow : public QMainWindow , public Ui::GudaywellWindow
{
	Q_OBJECT
	
	public:
		GudaywellWindow(QWidget *parent=0);
		~GudaywellWindow();
	protected:
	    void closeEvent(QCloseEvent *event);
	private slots:
		void showSetting();
		void newFile();
   		void open();
    	void saveFile();
		void save(QString);
    	void saveAs();
    	void closeFile();
    	void about();
		void aboutQt();
		void changeLang(bool);
	private:
		InsertDataDialog setting;
		DaysForm daysForm;
		DbAdmin *db;
		QActionGroup *langAGroup;
		void modified();
		void updateTitle();
		QString currentFile;
		QString currentTempFile;
		void makeSlotsConnections();
    	bool okToContinue();
    	void updateRecentFileActions();
    	QString strippedName(const QString &fullFileName);
    	
    	enum { MaxRecentFiles = 5 };
};

#endif
